﻿package view.bushuai.map
{

    public class MapInfo extends Object
    {
        public static var Map_H:int;
        public static var Tile_W:int;
        public static var COLS:int;
        public static var Map_W:int;
        public static var Tile_H:int;
        public static var ROWS:int;
		public static var HarfTile_W:Number;
		public static var HarfTile_H:Number;
		public static var Angle:Number;
		public static var MoveSpeed0:Number;
		public static var MoveSpeed1:Number;
		public static var LeftDownLen:Number;
		public static var IntervalTimeMin:Number;
        public function MapInfo()
        {
            return;
        }// end function

        public static function init(COLS:int, ROWS:int, CellHeight:int,CellWidth:int,MoveSpeed:Number) : void
        {
            MapInfo.COLS = COLS;
            MapInfo.ROWS = ROWS;
            MapInfo.Tile_H = CellHeight;
            MapInfo.Tile_W = CellWidth;
			MapInfo.Map_H = (MapInfo.ROWS / 2) * CellHeight - (CellHeight/2);
            MapInfo.Map_W = (MapInfo.COLS) * CellWidth - (CellWidth / 2);
			
			HarfTile_W = CellWidth / 2;
			HarfTile_H = CellHeight / 2;
			Angle = CellHeight / CellWidth;
			MapInfo.MoveSpeed0 = MoveSpeed;
			MapInfo.MoveSpeed1 = MoveSpeed * Math.sin(45);
			MapInfo.LeftDownLen = MapInfo.HarfTile_H / Math.sin(45);
			MapInfo.IntervalTimeMin = 1 / MoveSpeed;
            return;
        }// end function

    }
}
